#ifndef _COM_LORA_H_
#define _COM_LORA_H_

#include "stm32f10x.h"

#define COM_LORA_UART_PORT      		(USART2)

#define COM_LORA_UART_RCC        		RCC_APB1Periph_USART2
#define COM_LORA_UART_RCC_GPIO   		RCC_APB2Periph_GPIOA
#define COM_LORA_UART_GPIO_TX	   		GPIO_Pin_2
#define COM_LORA_UART_GPIO_RX	   		GPIO_Pin_3
#define COM_LORA_UART_PORT_GPIO  		GPIOA

#define COM_LORA_UART_BAUD       		(9600)

typedef void (*com_lora_cb_t)(unsigned char ch);
void com_lora_register_callback(com_lora_cb_t cb);

void com_lora_init(void);
void com_lora_put_byte(unsigned char ch);

#endif
